package com.dicsystems.myrec.dto;

import java.io.Serializable;

import android.content.ContentValues;

@SuppressWarnings("serial")
public class Todo implements Serializable {

	public String id;
	public String start_date;
	public String start_time;
	public String end_date;
	public String end_time;
	public String title;
	public String category_id;
	public String memo;
	public String latitude;
	public String longitude;
	public String place;
	public String category_name;

	public Todo() {}

	public Todo(String id, String start_date, String start_time, String end_date, String end_time, String title, String category_id, String memo, String latitude, String longitude, String place) {
		this.id = id;
		this.start_date = start_date;
		this.start_time = start_time;
		this.end_date = end_date;
		this.end_time = end_time;
		this.title = title;
		this.category_id = category_id;
		this.memo = memo;
		this.latitude = latitude;
		this.longitude = longitude;
		this.place = place;
	}

	public Todo(String[] todo) {
		this.id = todo[0];
		this.start_date = todo[1];
		this.start_time = todo[2];
		this.end_date = todo[3];
		this.end_time = todo[4];
		this.title = todo[5];
		this.category_id = todo[6];
		this.memo = todo[7];
		this.latitude = todo[8];
		this.longitude = todo[9];
		this.place = todo[10];
	}

	public ContentValues get() {
		ContentValues values = new ContentValues();
		values.put("_id", this.id);
		values.put("start_date", this.start_date);
		values.put("start_time", this.start_time);
		values.put("end_date", this.end_date);
		values.put("end_time", this.end_time);
		values.put("title", this.title);
		values.put("category_id", this.category_id);
		values.put("memo", this.memo);
		values.put("latitude", this.latitude);
		values.put("longitude", this.longitude);
		values.put("place", this.place);
		return values;
	}
}
